﻿<%@ control language="C#" autoeventwireup="true" inherits="WUC_Header, App_Web_20v1cpez" %>

<script type="text/javascript">

    function keydownsearch(evt) {
        if (document.getElementById('txtSearch') != null) {
            evt = (evt) ? evt : ((window.event) ? window.event : "")
            keyCode = evt.keyCode ? evt.keyCode : (evt.which ? evt.which : evt.charCode);
            if (keyCode == 13) {
                Search_Submit();
                return false;
            }
        }
    }

    function Search_Submit() {
        if (document.getElementById('txtSearch').value != '') {
            var searchType = '<%=searchType%>';
            if (searchType == 0) {
                window.location.href = '<%=searchProduct%>?q=' + encodeURI(document.getElementById('txtSearch').value);
            }
            else {
                window.location.href = '<%=searchNews%>?q=' + encodeURI(document.getElementById('txtSearch').value);
            }
        }
        else {
            alert('<%=strAlert%>');
        }
    }

</script>
  
<div id="NotifyDiv" runat="server" visible="false" style="padding:5px 10px; text-align:center; background:#FFFF85; z-index:10; position:relative; top:0px; border-bottom:solid 1px #FFA466; cursor:pointer;" onclick="this.style.display='none'">
    <asp:Label ID="lblNotify" runat="server" style="font-size:11pt; color:#000; font-weight:700;" meta:resourcekey="lblNotifyResource1"></asp:Label>
</div>
  
<div class="container">
    <div class="row">
        <div id="LanguageDiv" runat="server"></div>

        <div class="col-xs-12 col-sm-9 col-md-9">
            <asp:HyperLink ID="hlLogo" runat="server" meta:resourcekey="hlLogoResource1">[hlLogo]</asp:HyperLink>
        </div>

        <div id="topsearch" class="col-xs-12 col-sm-3 col-md-3">
            <div class="input-group search_group">
                <input id="txtSearch" type="text" name="name" class="form-control input-sm" onkeydown="keydownsearch(event);" placeholder="<%=lblAlert.Text%>" value='<%=strSearch%>' />
                <span class="input-group-btn">
                    <a href="javascript:;" onclick="Search_Submit()" class="btn btn-sm mysearch_btn" type="button">
                    <asp:Label ID="lblSearch" runat="server" Text="搜 索" meta:resourcekey="lblSearchResource1"></asp:Label></a>
                </span>
            </div>
        </div>
    </div>
</div>

<asp:Label ID="lblAlert" runat="server" Text="请输入关键字" Visible="False" meta:resourcekey="lblAlertResource1"></asp:Label>
<asp:Label ID="lblLanguage" runat="server" Text="语言选择：" Visible="False" meta:resourcekey="lblLanguageResource1"></asp:Label>

